<!DOCTYPE html>
<html style="font-size: 23.4375px;">
<head>
    <include file="./public/header.html"/>
<body style="font-size: 21.7589px;">
<div id="app">
    <div id="shadow" style="display: none;"></div>
    <header class="top"><span style="display: none;">加载中...</span> <span>提现</span> <!---->
        <div class="iconfont back" style="display: none;"></div>
        <a href="{:U('Users/userCenter')}" class="iconfont back" style=""></a></header>

    <div data-v-bf99809e="" class="main" s="[object Object]">
        <table data-v-bf99809e="">
            <tbody data-v-bf99809e="">
            <tr data-v-bf99809e="">
                <td data-v-bf99809e="">账户余额</td>
                <td data-v-bf99809e="">
                    <input data-v-bf99809e="" type="text" value="<?php echo sprintf('%.2f',$res['money']); ?>"
                           readonly="readonly" class="cGold">
                </td>
            </tr>
            <tr data-v-bf99809e="">
                <td data-v-bf99809e="">可提金额</td>
                <td data-v-bf99809e="">
                    <input data-v-bf99809e="" type="text" value="<?php if($cc==0){
							      echo '0.00';
                    }else{
                    echo sprintf('%.2f',$cc);
                    }
                    ?>" readonly="readonly" id="keti" class="cGold ">
                </td>
            </tr>
            <tr data-v-bf99809e="" class="bankTr" style="">
                <td data-v-bf99809e="">提现账户</td>
                <td>
                    <select data-v-df275b96="" id="sex" class="yinhang2" style="width: 260px;height: 50px;border: none">
                        <foreach name="ban" item="v">

                            <option data-v-df275b96="" value="{$v.id}">

                                <div data-v-73d9efcd="" class="text "style="background-color: white;height: 50px">
                                    <strong data-v-73d9efcd="">
                                        <?php if($v["bankid"]=='1'){echo "工商银行";}
									        elseif($v["bankid"]=='2'){echo "建设银行";}
                                            elseif($v["bankid"]=='3'){echo "农业银行";}
                                            elseif($v["bankid"]=='4'){echo "民生银行";}
                                            elseif($v["bankid"]=='5'){echo "招商银行";}
                                            elseif($v["bankid"]=='6'){echo "交通银行";}
                                            elseif($v["bankid"]=='7'){echo "中国银行";}
                                            elseif($v["bankid"]=='8'){echo "邮政储蓄";}
                                            elseif($v["bankid"]=='9'){echo "中信银行";}
                                            elseif($v["bankid"]=='10'){echo "兴业银行";}
                                            elseif($v["bankid"]=='11'){echo "华夏银行";}
                                            elseif($v["bankid"]=='12'){echo "浦发银行";}
                                            elseif($v["bankid"]=='13'){echo "广发银行";}
                                            elseif($v["bankid"]=='14'){echo "平安银行";}
                                            elseif($v["bankid"]=='15'){echo "光大银行";}
                                            elseif($v["bankid"]=='16'){echo "农商银行";};?>
                                    </strong>
                                    <p data-v-73d9efcd="">尾号：<span class="wei" ><?php echo "********".substr(trim($v['card']),-4);?></span></p>
                                </div>
                            </option>
                        </foreach>
                    </select>
                </td>
            </tr>
            <tr>

            </tr>
            <tr data-v-bf99809e="">
                <td data-v-bf99809e="">提现金额</td>
                <td data-v-bf99809e="">
                    <input data-v-bf99809e="" type="tel" tag="提现金额" placeholder="请输入您要提现的金额" class="money556 money" name="Money">
                </td>
            </tr>
            <tr data-v-bf99809e="">
                <td data-v-bf99809e="">安全密码</td>
                <td data-v-bf99809e="">
                    <form data-v-bf99809e="" action="" autocomplete="off">
                        <input data-v-bf99809e="" type="password" tag="安全密码" placeholder="请输入您的安全密码" class="anquan" name="SafePassword">
                    </form>
                </td>
            </tr>
            <tr data-v-bf99809e=""></tr>
            </tbody>
        </table>
        <div data-v-bf99809e="" class="loginBtn BTN">
            <a data-v-bf99809e="" onclick="tijiao()">确定</a>
        </div>
        <div data-v-bf99809e="" class="tips">
            今天还可以提现
            <ins data-v-bf99809e="">5</ins>
            次<br data-v-bf99809e="">
            <div data-v-bf99809e=""> 可提现金额 = （有效投注 >= 最后一次充值金额）+ 奖金 + 活动礼金</div>
            <i>十分彩网保障玩家资金绝对安全，监管举报：524848795@qq.com</i>
        </div>
    </div>
    <!--验证账号弹出框 begion-->
    <div id="money" class="layermbox layermbox0 layermshow" index="1" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">-提现金额不能为空-</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--验证账号弹出框 end-->
    <!--验证账号弹出框 begion-->
    <div id="anquan" class="layermbox layermbox0 layermshow" index="1" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">-安全密码不能为空-</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--验证账号弹出框 end-->
    <!--验证账号弹出框 begion-->
    <div id="gaoyu" class="layermbox layermbox0 layermshow" index="1" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">-提现金额不能大于可提金额-</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--验证账号弹出框 end-->
    <!--验证账号弹出框 begion-->
    <div id="anquan2" class="layermbox layermbox0 layermshow" index="1" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">-安全密码不正确-</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--验证账号弹出框 end-->
    <!--验证账号弹出框 begion-->
    <div id="tijiao" class="layermbox layermbox0 layermshow" index="1" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">-提交成功-</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--验证账号弹出框 end-->
    <!--验证账号弹出框 begion-->
    <div id="money2" class="layermbox layermbox0 layermshow" index="1" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">-单笔提现：最低20元，最高500000元-</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--验证账号弹出框 end-->
</div>

</body>
</html>
<script>
   $(".layermbtn").click(function(){
       $(".layermbox").hide();
       window.location.href = "";
   })
    function tijiao() {
        var keti = parseInt($("#keti").val());

        var zhanghao = $(".yinhang2").val();
        var money = parseInt($(".money").val());

        var anquan = $(".anquan").val();
        if(money==""){
           $("#money").show();
            return false;
        }
        if(money<20){
            $("#money2").show();
            return false;
        }
        if(money > keti){
            $("#gaoyu").show();
            return false;
        }
        if(anquan==""){
            $("#anquan").show();
            return false;
        }
        $.ajax({
            type: "POST",
            url: "{:U('Index/tx_do')}",
            data: {'money':money, 'aid':zhanghao,'safep':anquan},
            dataType: "json",
            success: function(data){
                if(data=='1'){
                    $("#tijiao").show();
                }else if(data=='2'){
                    $("#anquan2").show();
                    return false;
                }
            }
        });


    }
</script>